{% extends 'base.html' %}
{% block title %}
    <title>用户信息页面</title>
{% endblock %}
{% block content %}
    <div class="container" style="padding: 120px 0">
        <div class="row">
            <div class="col-md-3">
                <div class="well">
                    <div class="list-group-item">
                        <img class="img-circle" src="/media/{{ user.head_img }} " style="width: 45px;height: 45px" alt="用户头像">
                        {{ user }}
                        
                    </div>
                    {% if sub == 'head' %}
                        <a href="{% url 'userinfo' 'head' %}" class="list-group-item active">设置头像</a>
                        <a href="{% url 'userinfo' 'pwd' %}" class="list-group-item">修改密码</a>
                    {% elif sub == 'pwd' %}
                        <a href="{% url 'userinfo' 'head' %}" class="list-group-item ">设置头像</a>
                        <a href="{% url 'userinfo' 'pwd' %}" class="list-group-item active">修改密码</a>
                    {% endif %} 

                    <a href="/admin" class="list-group-item">登录后台</a>
                    <a href="#" class="list-group-item">退出登录</a>
{#                    <a href="#" class="list-group-item">每年更新成本</a>#}
                </div>
            </div>
            <div class="col-md-9">
                {# sub子页面 #}
                {% include subhtml %}
            </div>
        </div>
    </div>

{% endblock %}